package com.shen.start;

public class Test2 {
    public static void main(String[] args) {
    C c = new  D();
}

}
class C {
    static
    {
        System.out.println("C 父类静态域 ");
    }
    {
        System.out.println("C 父类对象成员构造函数");
    }
    public C(){
        System.out.println("C 父类本身的构造函数");
    }
}
class D extends C{
    static
    {
        System.out.println("D 子类静态域");
    }
    {
        System.out.println("D 子类对象成员构造函数");
    }
    public D(){
        System.out.println("D 子类本身的构造函数");
    }
}
